<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<script type="text/javascript" src="${ctx}/js/global_util.js"></script>

<table class="display" id="example">
    <thead>
    <tr>
        <th><span style="text-align:left; width:20px"> <input type="checkbox" id="form-updates14" value="1" onclick="checkAll(this, 'work_${listType}_checkbox')"/> </span>全选 </th>
        <th>姓名</th>
        <th>部门</th>
        <th>岗位</th>
        <th>职等</th>
    </tr>
    </thead>
    <tbody>
    <s:if test="#request.works==null or #request.works.size()==0">
        <tr class='gradeX'><td colspan="5">没有数据</td></tr>
    </s:if>
    <s:else>
        <s:iterator value="#request.works" var="work" status="sta">
        <tr class='grade${sta.even?"C":"A"}'>
            <td><span style="text-align:left; width:20px"> <input type="checkbox" name="work_${listType}_checkbox" value="${work.id}" /> </span> </td>
            <td>${work.baseId.name}</td>
            <td>${work.organization.fullName}</td>
            <td>${work.duty.dutyName}</td>
            <td>${work.grade.gradeName}</td>
            <td>${work.grade.gradeSort}</td>
        </tr>
        </s:iterator>
    </s:else>
    </tbody>
</table>
<p id="${listType}" class="ehr">
    <%@ include file="custom_user_list_pager.jsp"%>
</p>
<div class="container_12 clearfix leading">
    <s:if test="#request.works!=null and #request.works.size()>0">
    <div class="form-action clearfix" ${listType == "un_set" ? "style='float:right; padding-right:10px'" : ""}>
        <s:if test="#request.listType == 'un_set'">
        <p><a class="button" href="javascript:void(0)" onclick="addCheckIds()"><span style="background:url(${ctx}/images/img/table_go.png)" class="icon">&nbsp;</span>添加</a> </p>
        </s:if>
        <s:elseif test="#request.listType == 'has_set'">
        <p><a class="button" href="javascript:void(0)" onclick="deleteCheckIds()"><span style="background:url(${ctx}/images/img/table_delete.png)" class="icon">&nbsp;</span>删除</a> </p>
        </s:elseif>
    </div>
    </s:if>
</div>
